import { pageLayoutConfig } from "@/views/ai-pass/components/config";
const state = () => ({
  layoutConfigs: pageLayoutConfig,
  // 1单页面 2上下页面 3左右页面 4pc页面
  layoutType: 1,
});
const getters = {
  layoutConfigs: (state) => state.layoutConfigs[state.layoutType - 1],
  layoutType: (state) => state.layoutType,
};
const mutations = {
  SET_LAYOUT_CONFIGS(state, key, value) {
    state.layoutConfigs[state.layoutType - 1][key] = value;
  },
  SET_LAYOUT_TYPE(state, value) {
    state.layoutType = value;
  },
};
const actions = {
  setLayoutConfigs({ commit }, key, value) {
    commit("SET_LAYOUT_CONFIGS", key, value);
  },
  setLayoutType({ commit }, value) {
    commit("SET_LAYOUT_TYPE", value);
  },
};
export default {
  state,
  getters,
  mutations,
  actions,
};
